.menu-item {
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.menu-item:hover {
  background-color: #f3f4f6;
}

.smart-home {
  min-height: 100vh;
  background-color: #f8fafc;
}

.nav {
  background-color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  height: 64px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 50;
}

.nav__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon {
  color: #3b82f6;
  font-size: 24px;
}

.brand-text {
  font-size: 18px;
  font-weight: 500;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.weather {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weather-icon {
  color: #eab308;
}

.voice-control {
  background-color: #3b82f6;
  color: white;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.setting-icon {
  color: #4b5563;
  font-size: 20px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-menu {
  position: absolute;
  top: 48px;
  right: 0;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  min-width: 120px;
  z-index: 100;
}

.menu-item {
  padding: 8px 16px;
  cursor: pointer;
}

.menu-item:hover {
  background-color: #f3f4f6;
}

.main-content {
  padding: 80px 16px 96px;
  max-width: 1280px;
  margin: 0 auto;
}

.section-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 16px;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.room-card {
  background-color: white;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.room-name {
  font-weight: 500;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
}

.status-online {
  background-color: #dcfce7;
  color: #166534;
}

.status-offline {
  background-color: #fee2e2;
  color: #991b1b;
}

.room-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-label {
  color: #4b5563;
}

.camera-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.camera-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 256px;
  cursor: pointer;
}

.camera-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.camera-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.live-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-icon {
  color: #ef4444;
  font-size: 12px;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 12px 16px;
}

.footer__container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mode-buttons {
  display: flex;
  gap: 16px;
}

.mode-button {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f3f4f6;
  color: #374151;
  border: none;
}

.mode-button.active {
  background-color: #3b82f6;
  color: white;
}

.power-button {
  background-color: #ef4444;
  color: white;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
}

button {
  cursor: pointer;
  transition: all 0.2s;
}

button:hover {
  opacity: 0.9;
}

.mode-home {
  background-color: #f0f9ff;
  color: #1a202c;
}

.mode-away {
  background-color: #d3d3d3;
  color: #2e2e2e;
}

.mode-night {
  background-color: #000000;
  color: #ffffff;
}

.mode-save {
  background-color: #e8f5e9;
  color: #1b5e20;
}

/* 可选：统一处理卡片颜色 */
.smart-home .room-card,
.smart-home .camera-card {
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 可选：按钮透明风格 */
.mode-button {
  transition: all 0.2s ease;
}